// 根据角色动态生成路由
import { MockMethod } from "vite-plugin-mock";
import { resultSuccess, RequestParams } from "../_utils";

export default [
    {
        url: "/__api/mock/get_test",
        method: "get",
        timeout: 1000,
        response: ({ body, query, method }: RequestParams) => {
            const data = {
                body,
                query,
                method
            };
            return resultSuccess(data, { msg: "接口请求成功" });
        }
    },
    {
        url: "/__api/mock/post_test",
        method: "post",
        timeout: 1000,
        response: ({ body, query, method }: RequestParams) => {
            const data = {
                body,
                query,
                method
            };
            return resultSuccess(data, { msg: "接口请求成功" });
        }
    }
] as MockMethod[];
